package com.gcxy.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotNull;

@Data
@Validated
@ApiModel(value = "新增用户DTO")
public class AddUserDTO {

    @ApiModelProperty(value = "账号")
    @NotNull(message = "账号不能为空")
    @Length(max = 11, message = "账号长度不能超过11位")
    private String account;

    @ApiModelProperty(value = "密码")
    @NotNull(message = "密码不能为空")
    @Length(max = 16, message = "密码长度不能超过16位")
    private String password;

    @ApiModelProperty(value = "手机号")
    @NotNull(message = "手机号不能为空")
    @Length(max = 11, message = "手机号长度不能超过11位")
    private String phone;

    @ApiModelProperty(value = "邮箱")
    private String email;
}
